package com.showsu.editor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.showsu.editor.entity.doo.User;
import com.showsu.editor.entity.po.TblUser;

import java.util.List;

/**
 * @Author: William
 * @Description:
 * @Date: Created in 5:17 下午 2023/3/21
 * @Modified By:
 */
public interface IUserService extends IService<TblUser> {

    /**
     * 注册用户，非会员
     * @param mobile
     * @param openId
     * @param password
     * @return
     */
    User save(String mobile, String openId, String password);

    /**
     * 将某个用户处理成到期用户
     * @param userId
     * @return
     */
    int expiredUser(Long userId);

    /**
     * 查询用户
     * @param mobile
     * @return
     */
    User queryByMobile(String mobile);

    /**
     * 查询用户
     * @param openId
     * @return
     */
    User queryByOpenId(String openId);

    /**
     * 查询用户
     * @param userId
     * @return
     */
    User queryById(Long userId);

    /**
     * 查找当前已过期的用户
     * @return
     */
    List<User> queryExpiredUser();

    /**
     * 查找当前未过期的套餐用户
     * @return
     */
    List<User> queryUnExpiredVipUser();
}
